import { RouteRecordRaw, RouterView } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/dmp',
    component: RouterView,
    meta: { title: '数据标注' },
    redirect: '/dmp/task-list',
    children: [
      {
        path: '/dmp/task-list',
        component: () => import('@/views/online-lab/dmp/task-list/index.vue')
      },
      {
        path: '/dmp/add',
        component: () => import('@/views/online-lab/dmp/task-edit/index.vue')
      },
      {
        path: '/dmp/edit/:id',
        component: () => import('@/views/online-lab/dmp/task-edit/index.vue')
      },
      // {
      //   path: '/dmp/detail/:type(img|obj)/:id',
      //   component: () => import('@/views/online-lab/dmp/task-detail/index.vue')
      // },
      /* 标签组管理 */
      {
        path: '/dmp/tag-group-list',
        meta: { title: '标签组列表' },
        component: () => import('@/views/online-lab/dmp/tag-group-list/index.vue')
      },
      {
        path: '/dmp/tag-group-detail/:id',
        meta: { title: '标签组详情' },
        component: () => import('@/views/online-lab/dmp/tag-group-detail/index.vue')
      },
      {
        path: '/dmp/import-data/:id',
        meta: { title: '标签组详情' },
        component: () => import('@/views/online-lab/dmp/import-data/index.vue')
      }
    ]
  }
]

export default routes
